<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script src = 'jquery-1.10.1.min.js'></script>
        <script>
            $(function(){
               /*  $("h1").click(function(){
                    alert("单击");
                })

                $("h1").css("backgroundColor", 'orange');

                $("h1").mouseover(function(){
                    this.style.backgroundColor = 'red';
                })

                $("h1").mouseout(function(){
                    this.style.backgroundColor = 'blue';
                }) */

                //【注】我们可以通过链式操作对上述操作进行简化
                $("h1").click(function(){
                    alert("单击");
                })
                .css("backgroundColor", 'orange')
                .mouseover(function(){
                    this.style.backgroundColor = 'red';
                }).mouseout(function(){
                    this.style.backgroundColor = 'blue';
                })
            })
        </script>
    </head>
    <body>
        <h1>hello world</h1>
    </body>
   
</html>